package com.chuan.thinkingjava.exception;

public class InhertingExceptions {
	
	public void f() throws SimpleException{
		System.out.println("Throw SimpleException from f()");
		throw new SimpleException();
	}
	
	public static void main(String[] args) {
		InhertingExceptions sed = new InhertingExceptions();
		try {
			sed.f();
		} catch (Exception e) {
			System.out.println(" Caught it!");
		}
	}
}
class SimpleException extends Exception{}
